home *** CD-ROM | disk | FTP | other *** search
/ Atari Forever 4 / Atari Forever 4.zip / Atari Forever 4.iso / SERIE_SP / SP_002 / PORTFOLI / GAMES / TRON.BAS < prev    next >
BASIC Source File  |  1998-03-14  |  2KB  |  103 lines

  1. REM TRON BY CHRISTIAN PETER 0561-59145
  2. REM POSTF.310345 3500 KASSEL
  3. REM IDEE AUS >DAS SUPER GRAFIK BUCH
  4. REM ZUM ATARI ST<
  5. on error goto 1100
  6. dim h$(5),h(5)
  7. 5Randomize
  8. open"I",1,"HYSCORE.DAT"
  9. for i=1 to 4
  10. input#1,h$(i)
  11. input#1,h(I)
  12. next i
  13. close#1
  14. xa=120
  15. ya=64
  16. cls
  17. sp=50
  18. ' Initialisierung
  19. x=-1
  20. y=0
  21. zaehler=0
  22. a=xa/2
  23. b=ya/2
  24. time=timer
  25. anzahl=10
  26. screen 6
  27. PGLOAD "TRON2.PIC"
  28. 'Hauptschleife (Bewegung)
  29. 10 REM Schleife
  30. c$=inkey$
  31. c=asc(c$)
  32. if c=72 then gosub 100
  33. if c=80 then gosub 110
  34. if c=75 then gosub 120
  35. if c=77 then gosub 130
  36. 'Weiterbewegung
  37. a=a+x
  38. b=b+y
  39. if a<1 or a>xa or b<1 or b>ya then gosub 200
  40. if point(a,b)<>0 then gosub 300
  41. pset(a,b),1
  42. goto 10
  43. 100 x=0:y=-1:return
  44. 110 x=0:y=1:return
  45. 120 x=-1:y=0:return
  46. 130 x=1:y=0:return
  47. 200 gosub 300:goto 10
  48. 300 REM Kollision
  49. SOUND 55,10
  50. a=int(rnd*xa)
  51. b=int(rnd*ya)
  52. zaehler=zaehler+1
  53. if zaehler=anzahl then goto 400
  54. return
  55. 400 REM Schluss
  56.  cls
  57.  time=int((timer-time))
  58.  scr=(time/anzahl)
  59.  screen 7
  60.  print"    K e i n e  P a n i k   ! ! !"
  61.  print"    Durchhaltezeit:     ";time;" Sekunden"
  62.  print"    Rundenzahl:         ";anzahl
  63.  print"    Rundendurchschnitt: ";scr;" sek/Runde"
  64. repeat
  65. until inkey$<>""
  66. for i=1 to 4
  67. if scr>h(i) then goto 1000
  68. next i
  69. 500 open"O",1,"HYSCORE.DAT"
  70. locate 1,14,0:?" HIGHSCORE "
  71. box 2,14,7,25,1
  72. for i=1 to 4
  73. write#1,h$(I)
  74. write#1,h(I)
  75. locate 2+i,15,0
  76. ?h$(i);" ";h(i)
  77. next i
  78. close#1
  79. locate 8,1
  80. input "Nochmal (J/N)";n$
  81. if n$="J" or n$="j" then goto 5
  82. repeat
  83. locate 8,1,1
  84. until inkey$=""
  85. cls
  86. end
  87. 1000 REM
  88. ?"    Eine gute Zeit!"
  89. input "    Ihr Name ? (max 5 Buchstaben)";name$
  90. cls
  91. for j=4 to i step-1
  92. h(j+1)=h(j)
  93. h$(j+1)=h$(j)
  94. next j
  95. h(i)=scr
  96. h$(i)=name$
  97. goto 500
  98. 1100 rem Errorroutine
  99. screen 7
  100. Print "Nichbehebarer Fehler !"
  101. end
  102.  
  103.